<template>
	<div>
		<el-row style="margin-top: 15px;padding: 20px 0;">
			<el-col :span="24">
				<el-button type="primary" @click="goBack()">返回
				</el-button>
			</el-col>
		</el-row>
		<!-- banner下方快速入口 id=0 -->
		<div class="customer">
			<div style="display: flex;">
				<el-form ref="form" :model="data" label-width="80px">
					<el-form-item label="名称">
						<el-input v-model="data.sysRemark"></el-input>
					</el-form-item>
					<el-form-item label="跳转类型">
						<el-input style="width: 200px;" v-model="data.sysLink">
						</el-input>
					</el-form-item>
					<el-form-item label="图标">
						<we-ui-uploads :images="bannerIcon1" :maxCount="1" :maxSize="1024*512" @uploading="uploading1"></we-ui-uploads>
					</el-form-item>
					<el-button type="primary" style="margin-left: 25px;" @click="save_img(1)">保存</el-button>
				</el-form>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				data: {},
				bannerIcon1: []
			}
		},
		activated() {
			this.data = this.$route.query.data
			this.bannerIcon1 = []
			this.bannerIcon1.push(this.data.sysValue)
		},
		methods: {
			save_img(e) {
				this.data.sysValue = this.bannerIcon1.join('')
				var data = {
					sysRemark: this.data.sysRemark,
					sysCode: this.data.sysCode,
					sysValue: this.data.sysValue,
					sysLink: this.data.sysLink
				}
				this.dataApi.ajax('editSysParam', data, res => {
					if (res.responseType == 'S') {
						this.showMsg('保存成功')
					}
				});
			},
			uploading1(f) {
				this.dataApi.upload('FileUploadNotify/upload', f.file, res => {
					if (res.responseType == 'S') {
						f.images.splice(f.index, 1, res.filePath);
					}
				});

			}
		}
	
	}
</script>


<style>
</style>
